home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: miker3@ix.netcom.com (Mike Rubenstein)
- Newsgroups: comp.lang.c++,comp.lang.c,comp.lang
- Subject: Re: Undefined behavior? on type conversion, was: Re: Hungarian notation
- Date: Wed, 07 Feb 1996 12:46:25 GMT
- Organization: Netcom
- Message-ID: <31189e62.47294315@nntp.ix.netcom.com>
- References: <30C40F77.53B5@swsbbs.com> <4d2ok0$69s@beach.and.nl> <4er2qo$h2s@galaxy.ucr.edu> <31118641.6802368@nntp.ix.netcom.com> <4eurpq$b75@news.xmission.com> <31137427.133220928@nntp.ix.netcom.com> <4f975g$g18@news.xmission.com>
- NNTP-Posting-Host: ix-dc9-20.ix.netcom.com
- X-NETCOM-Date: Wed Feb 07 4:46:33 AM PST 1996
- X-Newsreader: Forte Agent .99d/32.182
-
- NOTE: I have trimmed the Newsgroups
-
- tknarr@xmission.com ( Todd Knarr ) wrote:
-
- > In <31137427.133220928@nntp.ix.netcom.com>, miker3@ix.netcom.com (Mike Rubenstein) writes:
- > >No, I can't tell that you read the standard conservatively. You seem
- > >to be adding things that just aren't there. You're saying that
- >
- > The thing is, I don't recall anything in the standard where "result"
- > precludes side-effects. So, I don't assume there is such a prohibition.
- > I may be wrong, but if I am I probably won't break code because of it.
- >
- > >The standard does not say that a machine must have the ability to do
- > >multiplication either. That doesn't mean that an implemenation can
- > >simply give an exception if you do a multiplication -- it must handle
- > >it in software since the standard requires a C implementation be able
- > >to do multiplication.
- >
- > Except that it does require multiplication to be done, and it does
- > leave the results of things like overflow up to the application. Ditto
- > the result of / when the second operand is 0.
-
- Just as it requires a conversion to be done for (char) 256, even if
- char is 8 bits. Again, the standard says a cast does a conversion and
- this is the correct syntax and valid data for the operation. Hence a
- conversion must be done.
-
- Michael M Rubenstein
-